//
//  FirstTwoBannerModel.m
//  DaJiHui
//
//  Created by Mac on 2017/9/27.
//  Copyright © 2017年 Hao. All rights reserved.
//

#import "FirstTwoBannerModel.h"

@implementation FirstTwoResModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key  isEqual: @"id"]) {
        _myid = value;
    }
}

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    FirstTwoResModel *b = [[FirstTwoResModel alloc]initWithDic:dic];
    return b;
}

+ (NSMutableArray *)transformWithArry:(NSArray *)array
{
    NSMutableArray *temparr = [NSMutableArray array];
    //遍历数组
    for (NSDictionary *dic in array) {
        @autoreleasepool {
            
            
            //创建对象
            id m = [self modelWithDic:dic];
            //添加数组
            
            [temparr addObject:m];
        }
    }
    return temparr;
}


@end

@implementation FirstTwoBannerModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key  isEqual: @"id"]) {
        _myid = value;
    }
}

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    FirstTwoBannerModel *b = [[FirstTwoBannerModel alloc]initWithDic:dic];
    return b;
}

+ (NSMutableArray *)transformWithArry:(NSArray *)array
{
    NSMutableArray *temparr = [NSMutableArray array];
    //遍历数组
    for (NSDictionary *dic in array) {
        @autoreleasepool {
            
            
            //创建对象
            id m = [self modelWithDic:dic];
            //添加数组
            
            [temparr addObject:m];
        }
    }
    return temparr;
}

@end
